<div class="col-12">
    <div class="card">
        <div class="card-header">
            <h3 class="card-title">{{.label}}</h3>

            <div class="card-tools">

                <div class="input-group input-group-sm" style="width: 250px;">
                    <a  class="btn btn-success btn-sm"  data-toggle="modal" data-target="#addUserModal">
                        <i class="fa fa-plus "></i>
                    </a>
                    <input id="search-user" type="text" name="table_search" class="form-control float-right" placeholder="Search" value="{{ .key }}">
                    <div class="input-group-append">
                        <a type="submit" class="btn btn-default" id="search-user-a">
                            <i class="fa fa-search" style="color: grey"></i>
                        </a>
                    </div>
                </div>
            </div>
        </div>
        <!-- /.card-header -->
        <div class="card-body table-responsive p-0">
            <table class="table table-hover text-nowrap">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>用户名</th>
                    <th>姓名</th>
                    <th>角色组</th>
                    <th>超管</th>
                    <th>电子邮箱</th>
                    <th>手机号</th>
                    <th>登陆状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {{ range   .user_list }}
                <tr>
                    <td>{{ .ID }}</td>
                    <td>{{ .UserName }}</td>
                    <td>{{ .NickName }}</td>
                    <td>{{ .RoleNames }}</td>
                    <td>
                        <span class="badge badge-success">{{ .IsSuper }}</span>
                    </td>
                    <td>{{ .Email }}</td>
                    <td>{{ .Mobile }}</td>
                    <td><span class="badge badge-success">{{ .Status }}</span></td>
                    <td>
                        <a class="btn btn-xs btn-info" userid="{{ .ID }}" name="edit-user"  data-toggle="tooltip" data-placement="top" title="修改">
                            <span class="fa fa-edit"></span>
                        </a>


                        <a class="btn btn-xs btn-warning" userid="{{ .ID }}" name="change-pwd" data-toggle="tooltip" data-placement="top" title="修改密码">
                            <span class="fa fa-key"></span>
                        </a>
                        <a class="btn btn-xs btn-danger" userid="{{ .ID }}" name="del-user" data-toggle="tooltip" data-placement="top" title="删除">
                            <span class="fa fa-trash"></span>
                        </a>
                    </td>
                </tr>

                {{end}}

                </tbody>
            </table>
        </div>
        <!-- /.card-body -->
        <div class="card-footer clearfix">

        </div>
    </div>
    <!-- /.card -->
</div>

<!--模态框-->
<!--添加用户-->
<div class="modal fade" id="addUserModal" tabindex="-1" role="dialog" aria-labelledby="addUserModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header color-back">
                <h6 class="modal-title pull-left" id="addUserModalLabel">添加</h6>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close" style="color: white;font-family: -webkit-pictograph;">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">

                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">角色组:</label>
                    <div class="col-sm-5">
                        <select class="form-control my-radius selectpicker" id="role-group" multiple>
                            {{ range  .role_list }}
                            <option value="{{ .ID }}">{{ .RoleName }}</option>
                            {{ end }}
                        </select>
                    </div>
                </div>

                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">用户名:</label>
                    <div class="col-sm-5">
                        <input type="text" class="form-control my-radius" placeholder="用户名" id="username">
                    </div>
                </div>
                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">昵称:</label>
                    <div class="col-sm-5">
                        <input type="text" class="form-control my-radius" placeholder="昵称" id="nickname">
                    </div>
                </div>

                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">密码:</label>
                    <div class="col-sm-5">
                        <input type="password" class="form-control my-radius" placeholder="密码" id="password">
                    </div>
                </div>

                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">电子邮箱:</label>
                    <div class="col-sm-5">
                        <input type="text" class="form-control my-radius" placeholder="电子邮箱" id="email">
                    </div>
                </div>


                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">手机号:</label>
                    <div class="col-sm-5">
                        <input type="text" class="form-control my-radius" placeholder="手机号" id="mobile">
                    </div>
                </div>

                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">超级管理员:</label>
                    <div class="col-sm-5">
                        <select class="form-control my-radius" id="is-super">
                            <option value="false">否</option>
                            <option value="true">是</option>
                        </select>
                    </div>
                </div>

                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">状态:</label>
                    <div class="col-sm-5">
                        <select class="form-control my-radius" id="status">
                            <option value="1">正常</option>
                            <option value="0">锁定</option>
                        </select>
                    </div>
                </div>

            </div>

            <div class="modal-footer color-gray">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-info" id="add-user-sub">提交</button>
            </div>
        </div>
    </div>
</div>
<!--/添加用户-->

<!--修改用户-->
<div class="modal fade" id="editUserModal" tabindex="-1" role="dialog" aria-labelledby="editUserModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header color-back">
                <h6 class="modal-title pull-left" id="editUserModalLabel">修改</h6>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close" style="color: white;font-family: -webkit-pictograph;">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">

                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right ">角色组:</label>
                    <div class="col-sm-5">
                        <select class="form-control my-radius selectpicker" id="edit-role-group" multiple>
                            {{ range .role_list }}
                                <option value="{{ .ID }}">{{ .RoleName }}</option>
                            {{ end }}
                        </select>
                    </div>
                </div>

                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">用户名:</label>
                    <div class="col-sm-5">
                        <input type="text" class="form-control my-radius" placeholder="用户名" id="edit-username">
                    </div>
                </div>
                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">昵称:</label>
                    <div class="col-sm-5">
                        <input type="text" class="form-control my-radius" placeholder="昵称" id="edit-nickname">
                    </div>
                </div>

                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">密码:</label>
                    <div class="col-sm-5">
                        <input type="password" class="form-control my-radius" placeholder="不修改密码请留空" id="edit-password">
                    </div>
                </div>

                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">电子邮箱:</label>
                    <div class="col-sm-5">
                        <input type="text" class="form-control my-radius" placeholder="电子邮箱" id="edit-email">
                    </div>
                </div>


                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">手机号:</label>
                    <div class="col-sm-5">
                        <input type="text" class="form-control my-radius" placeholder="手机号" id="edit-mobile">
                    </div>
                </div>

                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">超级管理员:</label>
                    <div class="col-sm-5">
                        <select class="form-control my-radius" id="edit-is-super">
                            <option value="false">否</option>
                            <option value="true">是</option>
                        </select>
                    </div>
                </div>

                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">状态:</label>
                    <div class="col-sm-5">
                        <select class="form-control my-radius" id="edit-status">
                            <option value="1">正常</option>
                            <option value="0">锁定</option>
                        </select>
                    </div>
                </div>

            </div>

            <div class="modal-footer color-gray">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-info" id="edit-user-sub">提交</button>
            </div>
        </div>
    </div>
</div>
<!--/修改用户-->
<div class="modal fade" id="changepwdModal" tabindex="-1" role="dialog" aria-labelledby="changepwdModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header color-back">
                <h6 class="modal-title pull-left" id="changepwdModalLabel">修改密码</h6>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close" style="color: white;font-family: -webkit-pictograph;">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">密码:</label>
                    <div class="col-sm-5">
                        <input type="password" class="form-control my-radius" placeholder="请输入密码" id="change-pwd">
                    </div>
                </div>

                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">确认密码:</label>
                    <div class="col-sm-5">
                        <input type="password" class="form-control my-radius" placeholder="请再次输入密码" id="change-pwd-try">
                    </div>
                </div>

            </div>

            <div class="modal-footer color-gray">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-info" id="change-pwd-sub">提交</button>
            </div>
        </div>
    </div>
</div>

<!--/模态框-->

